<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="java.io.*,java.sql.*,java.util.*,java.net.*,java.text.*"%>
<%@ page import="com.yuxin.common.util.*" %>
<%@ page import="com.yuxin.core.exception.SiteRuntimeException" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String dataId = request.getParameter("id");// 数据ID
    Connection conn = DBUtil.getConnection();
    Map contentMap = null;// 页面内容
    try{
        contentMap = DBUtil.findById(conn,"P_NOTE",dataId);
        request.setAttribute("content",contentMap);
        // 页面标题
        request.setAttribute("titleName","详情");
    }catch (Exception e){
        e.printStackTrace();
        throw new SiteRuntimeException(e);
    }finally {
        DBUtil.close(conn);
    }
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>${content.TITLE}</title>
    <meta name="Keywords" content="中信信用卡平台" />
    <meta name="Description" content="${content.TITLE}"/>
    <meta name="robots" content="all"/>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta http-equiv="cleartype" content="on"/>
    <link rel="icon" type="image/png" href="images/favicon.ico">
    <%@ include file="/site/css.jsp" %>
</head>
<body>
<div id="page">
    <%@ include file="/site/header_nav.jsp" %>
    <div id="container">
        <h1>${content.TITLE}</h1>
        <div class="article-time" ><fmt:formatDate value="${content.CREATE_TIME}" pattern="yyyy-MM-dd"/></div>
        <div class="article-content">
           <div class="title-img"><img src="${ctx}${content.IMG}"/></div>
           ${content.DESCRIPTION}
        </div>
    </div>
    <%@ include file="/site/footer.jsp" %>
</div>
<%@ include file="/site/js.jsp" %>
<script>
    $(document).ready(function(){
        var width = $(window).width() - 20;
        $("#container table").each(function(){
            if($(this).width() > width){
                //兼容低版本浏览器 暂时不适用wrap
                $(this).width(width);//.wrap("<div style='"+width+"px;overflow:auto;'></div> ");
            }
        });
    });
</script>
</body>
</html>